import com.qtcm.nas.fyx.bendianpinglun.pojo.Student;
import com.qtcm.nas.fyx.bendianpinglun.service.IUserService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class Demo02 {
    @Test
    public void test(){
        ApplicationContext applicationContext=new ClassPathXmlApplicationContext("applictionContext.xml");
        IUserService service= (IUserService)applicationContext.getBean("userService");
        List<Student> all = service.findAll();
        for (Student s : all
                ) {
            System.out.println(s);
        }
    }
}
